<%--
    fileName      : /msgmgmt/msgsmslog.jsp
    author        : mlw
    createDate    : 2016-05-11  
    lastModifier  : mlw
    lastModifyDate: 2016-05-11       
    description   : 列表页面
--%>
<%@ page language='java' contentType='text/html; charset=UTF-8' pageEncoding='UTF-8' %>
<%@ taglib uri='ctp-tag' prefix='ctp' %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
        <title></title>

        <ctp:include items='public,validator,groupbox,borderlayout,panel,form,button,toolbar,gridlayout,label,textfield,combobox,checkboxgroup,datepicker,grid,menus,chain,message_ex,link'/>

        <script type='text/javascript' kind='variant'>

            var borderlayout1;
            var querycondition;       //查询条件
            var queryForm;
            var queryGridlayout;
            var prdId; //prdId
            var msgType; //msgType
            var sendObject; //sendObject
            var sendMobile; //sendMobile
            var reset;                //重置    
            var submit;               //提交
            var v_msgsmslogId = "";		  //方法域中记录问题ID的变量
            var v_urlFirst='';
            var openFrom = '0';
            var queryGroupbox;
        </script>
        <script type='text/javascript' kind='event'>

	              
            /*
	         * @method submitForm
	         * @desc  表单提交
	         * @author mlw
	         */ 
            function submitForm(){
            	var url='<ctp:url href="msgsmslogmain.flowc" flowActionName="querymsgsmslog" params="language=\'zh_CN\';begNum=1;fetchNum=1;"/>'+getQueryInfo();
            	prolist.loadData(url);
            }
            /*
	         * @method resetForm
	         * @desc  表单重置
	         * @author mlw
	         */ 
            function resetForm(){
            	queryForm.reset();
            }

            /*
	         * @method getQueryInfo
	         * @desc  获取表单查询条件
	         * @author mlw
	         */ 
            function getQueryInfo(){
                var queryInfo =  "&prdName=" + encodeURI(prdName.getValue())  
                    +"&prdId=" + encodeURI(prdId.getValue())  					
					+"&msgType=" + encodeURI(msgType.getValue())  					
					+"&sendObject=" + encodeURI(sendObject.getValue())  					
					+"&sendMobile=" + encodeURI(sendMobile.getValue()) ;

                return queryInfo;
            }

       
            
        </script>
        <script type='text/javascript' kind='ui'>

            $(window).load(function(){
      		     //================================UI变量定义片段============================================================
      		     
						prdName = new ctp.ui.textfield ({//产品名称
							id : 'prdName' ,
							width:'180px',
							type : 'text'
						});	
					
						prdId = new ctp.ui.textfield ({//产品ID
							id : 'prdId' ,
							width:'180px',
							type : 'text'
						});	
						
						registerId = new ctp.ui.textfield ({//发送对象注册ID/
							id : 'registerId' ,
							width:'180px',
							type : 'text'
						});
						
						
						msgType = new ctp.ui.combobox ({//提示类型 1.私募下单,2.短信广告
							id : 'msgType' ,
							width:'180px',
							 defaultItems:[{
						            text:'全部',
						            value:'',
						            selected:'true'
						           }],
						       items:[
                                {text:'私募下单',value:'1',title:'私募下单'},     
						        {text:'短信广告',value:'2',title:'短信广告'}
						       ]
						});	
					
						sendObject = new ctp.ui.combobox ({//发送对象 1.销售渠道,2.APP用户
							id : 'sendObject' ,
							width:'180px',
							 defaultItems:[{
						            text:'全部',
						            value:'',
						            selected:'true'
						           }],
						       items:[
								{text:'渠道',value:'1',title:'渠道'},
						        {text:'客户',value:'2',title:'客户'}
						       ]
						});	
					
						sendMobile = new ctp.ui.textfield ({//手机号
							id : 'sendMobile' ,
							width:'180px',
							type : 'text'
						});	
					
                 submit = new ctp.ui.button({//提交
                     id:'submit'
                 });

                 reset = new ctp.ui.button({//重置
                     id:'reset'
                 });

                 queryGridlayout = new ctp.ui.gridlayout({
                     id: 'queryGridlayout',
                     width: '850px',
                     align: 'center',
                     defaults:{
             			align: 'center',
             			label: {width: '100px'},
            			element:{
            				//默认创建textfield组件
            				type: 'textfield',
            				//默认的组件自带属性,width设成'100%'或不传，则该组件和关联标签的宽度之和会占满所在的列
            				options:{width: '120px'}
            			}
                         			
             		 },
                                  
                     items: [

      				[
						{
                                label: {
                                    id: 'label0', 
                                    text: '产品名称', 
                                    width: '100px'
                                }, 
                                element: prdName
                        },

						{
                                label: {
                                    id: 'label1', 
                                    text: '产品代码', 
                                    width: '100px'
                                }, 
                                element: prdId
                        }],
      				[
						{
                                label: {
                                    id: 'label2', 
                                    text: '发送对象注册Id', 
                                    width: '100px'
                                }, 
                                element: registerId
                        },

						{
                                label: {
                                    id: 'label3', 
                                    text: '手机号', 
                                    width: '100px'
                                }, 
                                element: sendMobile
                        }] ,
                        [
 						{
                                 label: {
                                     id: 'label4', 
                                     text: '提示类型', 
                                     width: '100px'
                                 }, 
                                 element: msgType
                         },

 						{
                                 label: {
                                     id: 'label5', 
                                     text: '发送对象', 
                                     width: '100px'
                                 }, 
                                 element: sendObject
                         }]                         
                	                     ]
                 });
                 
                queryForm = new ctp.form({
                    id: 'queryForm',
                    items: [
						queryGridlayout
                    ],
                    postType:'ajax',
                    buttons : [{                           
	                        id: 'submit',              
	                        text: '<ctp:label key="submit"/>',                  
	                        icon:'apply',
	                        onClick: submitForm 
                 		}, {                                 
	                       id: 'reset',             
	                       text: '<ctp:label key="reset"/>',                   
	                       icon:'reload',
	                       onClick: resetForm
                 	    }]	
                });

                queryGroupbox = new ctp.ui.groupbox({
             		id:'queryGroupbox',
             		align :'center',
             		icon :'',
             		items:[queryForm]
                 });

                querycondition = new ctp.ui.panel({
                    id: 'querycondition',
                    contentPadding :'20px',
                    title: '<ctp:label key="query"/>',
                    items: [
						queryForm
                    ]
                });
                toolbar1 = new ctp.ui.toolbar({
                    id: 'toolbar1'
                    //type:'hidden'
                        /*
                    leftItems: [
                        {
                            type: 'button',
                            id: 'add',
                            name: 'add',
                            text: '<ctp:label key="add"/>',
                            icon: 'add',
                            onClick : addRecord
                        }
                        ,
                        '-'
                        ,
                        {
                            type: 'button',
                            id: 'modify',
                            name: 'modify',
                            text: '<ctp:label key="modify"/>',
                            icon: 'edit',
                            onClick : modifyRecord
                        },
                        '-'
                        ,
                        {
                            type: 'button',
                            id: 'delete',
                            name: 'delete',
                            text: '<ctp:label key="delete"/>',
                            icon: 'delete',
                            onClick : deleteRecords
                        }
                        ,
                        '-'
                        ,
                        {
                            type: 'button',
                            id: 'ExcelExport',
                            name: 'ExcelExport',
                            text: '<ctp:label key="export"/>',
                            icon: 'down',
                            onClick : queryInfosExport
                        }
                    ]
                    */
                });

                prolist = new ctp.ui.grid({
                    id: 'prolist',
                    title:'列表',
                    toolbar:toolbar1,
                    toolbarPos:'innertop',
                    url:'<ctp:url href="msgsmslogmain.flowc" flowActionName="querymsgsmslog" params="language=\'zh_CN\';begNum=1;fetchNum=1;"/>',
                    header: {
                        title: [
                            [
                                {text: '',width: '80px'}
                                ,
                                   	{			
										text: '产品名称'
									},	
									{			
										text: '产品代码'
									},								
									{			
										text: '提示类型'
									},								
									{			
										text: '发送对象'
									},								
									{			
										text: '对象手机号'
									},								
									{			
										text: '内容'
									},								
									{			
										text: '发送日期'
									},								
									{			
										text: '是否送达'
									}								                                
                            ]
                        ],
                        rowIdFieldName: "msgId",
                        attr: [
							{colType: 'radiobox'},
							{	
                            		fieldName: 'prdName'
								                            },
                            {	
	                            	fieldName: 'prdId'
									                            },
                            {	
	                            	fieldName: 'msgType'
									                            },
                            {	
	                            	fieldName: 'sendObject'
									                            },
                            {	
	                            	fieldName: 'sendMobile'
									                            },
                            {	
	                            	fieldName: 'sendCont'
									                            },
                            {	
	                            	fieldName: 'sendTime'
									                            },
                            {	
	                            	fieldName: 'sendSuccess'
									                            }                                                       
                        ]
                    },
                    footer: {
						auto:true                    
                    }
                });

              
                borderlayout1 = new ctp.ui.borderlayout({
                    id:'borderlayout1',
                    type: '2E',
                    north__size: 0.3,
                    north__items:[querycondition],
                    center__items:[prolist],
                    north__closable:false,
                    north__resizable : true,
                    renderTo: 'body'
                });
            });
        </script>


    </head>
    <body>

        <ctp:form name="queryForm" method="post" action="msgsmslogmain.flowc" flowActionName="">
        	
        </ctp:form>

    </body>
</html>
